package com.mmall.controller.test;

import com.mmall.pojo.DeptInfo;
import com.mmall.service.DeptInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * Created by Neo on 3/9/2023.
 */


@RestController
@RequestMapping(value = "/api")

public class RequestController {

    @Autowired
    private DeptInfoService deptInfoService;

    @RequestMapping(value = "/insert.do",method = RequestMethod.GET)
    public boolean insert() {
        System.out.println("开始从DeptManage的接口获取数据");
        RequestUtils.CallWebPageGet();
        //ArrayList<DeptInfo> infos = deptInfoService.getInfo();
//        for(DeptInfo info:infos) {
//            System.out.println("插入数据");
//            deptInfoService.insert(info);
//        }
        return true;
    }

}
